<h2 class="widgettitle">Bạn bè (<?php echo count($friendList)?>)</h2>
<div class="yd_rp_widget">
	<?php
		if ($friendList) {
			global $ubi;
			$i = 0;	
			foreach ($friendList as $friend) {
				$i++;		
	?>
			<h4>
				<a href="index.php?view&type=user&userid=<?php echo $friend->getUserID()?>">
			    	<img src="<?php echo $ubi['SERVER']['THUMBNAIL_PATH'] . '/' . $imgs[$friend->getUserID()]?>" width="80" />
			    	<?php echo $friend->getUserName()?>
			    </a>
		    </h4>    
	<?php 
				if ($i % $ubi['SITE']['N_FRIEND_PER_ROW'] == 0) {
	?>
					<div class="clear"></div>
	<?php 
				}
			}	 
		}
	?>
	<a href="index.php?view&type=friend">Xem tất cả...</a>
</div>
<hr />